/* GUI CONVERTED from rcshgwa4.p (converter v1.76) Wed May 22 11:22:29 2002 */
/* rcshgwa4.p - Shipper Gateway Subprogram                                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.3.1.3 $                                                       */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 8.6    LAST MODIFIED: 09/20/96   BY: TSI *K005*                  */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan           */
/* REVISION: 8.6    LAST MODIFIED: 04/23/99   BY: *K20L* Anup Pereira         */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown           */
/* $Revision: 1.3.1.3 $   BY: Jean Miller        DATE: 05/10/02  ECO: *P05V*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdeclre.i}

/* INPUT PARAMETERS */
define input parameter last_ship_recid as recid no-undo.
define input parameter due_date  as date no-undo.
define input parameter due_date1 as date no-undo.
define input parameter due_time  like schd_time no-undo.
define input parameter due_time1 like schd_time no-undo.
define input parameter ref       like schd_reference no-undo.
define input parameter ref1      like schd_reference no-undo.
define input-output parameter total_message_ct as integer no-undo.

/* LOCAL VARIABLES */
define variable append_msg as character no-undo.
define variable errors as logical no-undo.

{gprun.i ""rcvrfsh1.p""
   "(input last_ship_recid,
     input true,
     input false,
     output errors)"}

if errors then do:

   find abs_mstr where recid(abs_mstr) = last_ship_recid
   no-lock no-error.

   append_msg = if available abs_mstr then substring(abs_id,2,8)
                else "".

   hide message no-pause.
   /* Errors occurred for Gateway Shipper */
   {pxmsg.i &MSGNUM=1538 &ERRORLEVEL=4 &MSGARG1=append_msg}
   pause.

end.

else do:
   /* RSS Requirement Pegging */
   {gprun.i ""rcrspeg.p""
      "(input last_ship_recid,
        input false,
        input due_date,
        input due_date1,
        input due_time,
        input due_time1,
        input ref,
        input ref1,
        output errors)"}
end.

assign
   total_message_ct = if errors then total_message_ct + 1
                      else total_message_ct
   last_ship_recid  = ?.
